<template>
	<div class="cke_editable cke_editable_themed cke_contents_ltr cke_show_borders" v-html="content">
		
	</div>
</template>

<script>
	
	
	import {
		search,
	} from '@/api/wiki.js'
	export default {
		data() {
			return {
				content: null,
				formInline: {
					id:"",
				},
			}
		},
		methods:{
			async onSearch() {
				console.log("this.formInline: " + this.formInline);
				await search(this.formInline, 1,1)
					.then((response) => {
						this.content = response.items[0].wikicontent
					})
			},
		},
		created() {
			console.log("this.$route.params.id: " + this.$route.params.id);
			let id = this.$route.params.id;
			this.formInline.id = id;
			this.onSearch();
			
			// this.init();
		},
			
	}
</script>

<style>
	@import '../../public/ckeditor/contents.css';
</style>
